﻿<UserControl 
    x:Class="myManga.UI.ToastNotification"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    x:Name="Toast"
    Background="{x:Null}"
    HorizontalAlignment="Center"
    VerticalAlignment="Center" 
    MouseDown="ToastNotification_MouseDown"
    RenderTransformOrigin="0.5,0.5">
    <UserControl.Resources>
        <Storyboard x:Key="ToastFade" SpeedRatio="3">
            <DoubleAnimation Storyboard.TargetName="Toast" Storyboard.TargetProperty="Opacity"/>
            <DoubleAnimation Storyboard.TargetName="Toast" Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[0].(TranslateTransform.Y)"/>
            <DoubleAnimation Storyboard.TargetName="Toast" Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[1].(ScaleTransform.ScaleX)"/>
            <DoubleAnimation Storyboard.TargetName="Toast" Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[1].(ScaleTransform.ScaleY)"/>
        </Storyboard>
    </UserControl.Resources>
    <UserControl.RenderTransform>
        <TransformGroup x:Name="ToastTransformGroup">
            <TranslateTransform X="0" Y="0"/>
            <ScaleTransform ScaleX="1" ScaleY="1"/>
        </TransformGroup>
    </UserControl.RenderTransform>
    <Border
        Background="#333"
        BorderThickness="2"
        BorderBrush="#666"
        CornerRadius="5"
        Padding="5"
        Grid.Row="2">
        <TextBlock 
            x:Name="NotificationText"
            Foreground="GhostWhite" 
            TextAlignment="Center" 
            Text="Toast Notification"/>
    </Border>
</UserControl>